<template>
  <div>
    <h2>{{ $store.state.count }}</h2>
    <button @click="incrementAction">+1</button>
  </div>
</template>

<script>
import { onMounted } from "vue";
import { useStore } from "vuex";

export default {
  setup() {
    const store = useStore();
    onMounted(() => {
      store.dispatch("incrementAction");
    });
    return {};
  },
};
</script>

<style lang="scss" scoped>
</style>